from django.urls import path
from .views import VettingViews, VettingViewsTow, ApprovalsViews, ApprovalsViewsTow, InitiationsViews, DetailsViews, TodosVews, DonesViews
from .views import DisallowedViews, ThroughViews
from .views import *
urlpatterns = [
    # 审批类型
    path("vettings/", VettingViews.as_view({"get":"all_vetting", "post":"add_vetting"})),

    # 审批类型tow
    path("revivetting/<int:pk>/", VettingViewsTow.as_view({"put":"upd_vetting", "delete":"del_vetting", "get": "one_vetting"})),

    # 审批流程
    path("approvals/", ApprovalsViews.as_view({"get":"all_approvals", "post":"add_approvals"})),

    # 审批流程Tow
    path("reviseroval/<int:pk>/", ApprovalsViewsTow.as_view({"get":"one_approvals", "put":"upd_approvals", "delete":"del_approvals"})),

    # 我发起的
    path("initiations/", InitiationsViews.as_view({"get":"get_initiations","post":"add_initiations"})),

    # 我发起的2
    path("details/<int:pk>/", DetailsViews.as_view({"get":"one_details", "delete":"del_details"})),

    # 待办事项
    path("todos/", TodosVews.as_view({"get":"all_todos"})),

    # 已办事项
    path("dones/", DonesViews.as_view({"get":"all_dones"})),

    # 通过
    path("through/<int:pk>",ThroughViews.as_view()),

    # 驳回
    path("disallowed/<int:pk>", DisallowedViews.as_view()),


]
